import { AxiosResponse } from "axios";
import request from "./request";
import type { ReturnImageInfosObj } from "../types";

const getTotalPicsNumber = (): Promise<
  AxiosResponse<{
    total_pics: number;
    total_showed_pics: number;
    total_chosen_pics: number;
  }>
> => {
  return request({
    url: "/get_number_pics",
    method: "get",
  });
};

const getPagePicsInfos = (
  page?: number
): Promise<AxiosResponse<ReturnImageInfosObj>> => {
  return request({
    url: "/get_pali_paths",
    method: "get",
    params: { page: page },
  });
};

export { getTotalPicsNumber, getPagePicsInfos };
